//
//  ZCWebServiceHelper.h
//  Mooc
//
//  Created by ZhangCheng on 15/11/11.
//  Copyright © 2015年 ZhangCheng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"


@protocol ZCWebServiceHelperDelegate <NSObject>

@optional
- (void)zcwebServiceHelperDelegate;

@end

@class ASIFormDataRequest;
typedef NS_ENUM(NSInteger,RequestMethod){
    POST,
    GET
};
typedef NS_ENUM(NSUInteger, ZCWebServiceErrorType) {
    ZCWebServiceErrorTypeNone = 1,          //默认无错误
    ZCWebServiceErrorTypeJsonDecodeError,   //解析Json错误
    ZCWebServiceErrorTypeStatusCodeError,   //status状态码返回类型非数字
    ZCWebServiceErrorTypeTokenError,        //token失败
    ZCWebServiceErrorTypeConnectionError,   //网络连接错误
    ZCWebServiceErrorTypeOtherError,        //其它业务错误
    ZCWebServiceErrorTypeReloginPSWError    //从新登录密码错误
};

@class ASIHTTPRequest,ZCDownloadFileModal;
@interface ZCWebServiceHelper : NSObject

+(void)requestWithMethod:(RequestMethod)requestMethod andUrlStr:(NSString *)urlStr andParameters:(NSDictionary *)parameters andFinished:(void(^)(id response,NSURLSessionDataTask *dataTask))responseBlock;
@end
